home *** CD-ROM | disk | FTP | other *** search
/ Disc to the Future 2 / Disc to the Future Part II Programmer's Reference (Wayzata Technology)(6013)(1992).bin / MAC / OTHER_LA / MINIADA_ / MINIADA.TXT
Text File  |  1986-03-11  |  376b  |  19 lines

  1. declare 
  2.     m,n : integer;
  3.     b   : boolean;
  4. begin
  5.     <<again>> m := 10000;
  6.     for i in reverse 1 .. (m*3) loop
  7.        b := true;  n := i;
  8.        while b loop
  9.            if n=(2*(n/2)) then
  10.                n := (n/2); exit when n<i;
  11.            else
  12.                n := ((3*n)+1);
  13.            end if;
  14.            b := n>1 ;
  15.        end loop;
  16.     end loop;
  17.     goto again;
  18. end;
  19.